package com.eso.haBank.service

import com.eso.frame.InitialLoader
import com.eso.frame.cache.ICache
import com.eso.haBank.domain.Customization

class CustomizationService implements InitialLoader {

    ICache appGlobalCache;

    void loadAppCustomizeData(){
        Customization.list().each {customizeInstance ->
            appGlobalCache.put(customizeInstance.customizeType, customizeInstance);
        }
    }

    @Override
    void initLoad() {
        loadAppCustomizeData();
    }

    @Override
    void reload() {
        initLoad();
    }

    @Override
    boolean isOnLoad() {
        return true;
    }

    @Override
    int getLoadOrder() {
        return ORDER_FIRST;
    }
}
